<?php
class leftmenu extends CWidget
{
    private $model;

    public function init()
    {
        $criteria = new CDbCriteria;
        $criteria->addCondition("type='left'");
        //$criteria->addCondition("is_left=1");
        $this->model = MenuItems::model()->findAll($criteria);
    }

    public function run()
    {
        $this->render('leftmenu', array('model' => $this->model));
    }
}